mystr = "hello world and itcast and itheima and Python"

# 1、capitalize(): 字符串首字母大写
new_str = mystr.capitalize()
print(new_str)

# 2、title(): 字符串中每个单词首字母大写
new_str = mystr.title()
print(new_str)

# 3、upper(): 小写全部转大写
new_str = mystr.upper()
print(new_str)

# 4、lower(): 大写全部转小写
new_str = mystr.lower()
print(new_str)

print(new_str.islower()) # new_str中，全是小写时，返回True

# 5、swapcase(): 字符串的大小写字母转换
new_str = mystr.swapcase()
print(new_str)


